package com.jd.ty.web.filter;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;

public class CheckOrderFilter {
	public static final String MAP_KEY_COMPANY_NAME = "companyName";
	public static final String MAP_KEY_CUSTOMER_POSITION = "position";
	public static final String MAP_KEY_CUSTOMER_NAME = "customerName";
	public static final String MAP_KEY_PROJECT_TYPE = "projectType";
	public static final String MAP_KEY_STATUS= "status";
	private String[] companyName;
	private String[] position;
	private String[] customerName;
	private String[] projectType;

	public List<Map<String, Object>> toSet() {
		List<Map<String, Object>> set =new  ArrayList<Map<String, Object>>();
		if (null != companyName
				//REMOVE AT 2012-04-11, FOR REQUIREMENT CHANGE
				// && null != customerName && null != position	&& null != projectType
				) {
			for (int i = 0; i < companyName.length; i++) {
				Map<String, Object> map = new HashMap<String, Object>();
				map.put(MAP_KEY_COMPANY_NAME, companyName[i]);
				//REMOVE AT 2012-04-11, FOR REQUIREMENT CHANGE
//				map.put(MAP_KEY_CUSTOMER_POSITION, position[i]);
//				map.put(MAP_KEY_CUSTOMER_NAME, customerName[i]);
//				map.put(MAP_KEY_PROJECT_TYPE, projectType[i]);
				set.add(map);
			}
		}

		return set;
	}

	public String[] getCompanyName() {
		return companyName;
	}

	public void setCompanyName(String[] companyName) {
		this.companyName = companyName;
	}

	public String[] getPosition() {
		return position;
	}

	public void setPosition(String[] position) {
		this.position = position;
	}

	public String[] getCustomerName() {
		return customerName;
	}

	public void setCustomerName(String[] customerName) {
		this.customerName = customerName;
	}

	public String[] getProjectType() {
		return projectType;
	}

	public void setProjectType(String[] projectType) {
		this.projectType = projectType;
	}

}
